﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class sandbox_test_trans : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ctpDataContext db = new ctpDataContext();
        Hashtable _table = new Hashtable();
        switch (0)
        {
            case 0: //forum_text
                {
                    var posts = from forum in db.ct_s_forums
                                join tran in db.ct_language_texts on forum.no equals tran.post_no
                                where forum.no == 9
                                select new { original = forum.text, translated = tran.text, code = tran.language_no };
                    foreach (var post in posts)
                    {
                        _table.Add(post.code, post.translated);
                    }
                    _table.Add(16, posts.First().original);
                    break;
                }
        }
        foreach (DictionaryEntry item in _table)
        {
            Response.Write(item.Value + ":" + item.Key+"<br>");
        }
    }
}
